package com.ruoyi.wms.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wms.mapper.WmsMeasuringUnitConversionMapper;
import com.ruoyi.wms.domain.WmsMeasuringUnitConversion;
import com.ruoyi.wms.service.IWmsMeasuringUnitConversionService;

import javax.annotation.Resource;

/**
 * 换算Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-02-28
 */
@Service
public class WmsMeasuringUnitConversionServiceImpl implements IWmsMeasuringUnitConversionService 
{
    @Resource
    private WmsMeasuringUnitConversionMapper wmsMeasuringUnitConversionMapper;

    /**
     * 查询换算
     * 
     * @param mucUuid 换算主键
     * @return 换算
     */
    @Override
    public WmsMeasuringUnitConversion selectWmsMeasuringUnitConversionByMucUuid(String mucUuid)
    {
        return wmsMeasuringUnitConversionMapper.selectWmsMeasuringUnitConversionByMucUuid(mucUuid);
    }

    /**
     * 查询换算列表
     * 
     * @param wmsMeasuringUnitConversion 换算
     * @return 换算
     */
    @Override
    public List<WmsMeasuringUnitConversion> selectWmsMeasuringUnitConversionList(WmsMeasuringUnitConversion wmsMeasuringUnitConversion)
    {
        return wmsMeasuringUnitConversionMapper.selectWmsMeasuringUnitConversionList(wmsMeasuringUnitConversion);
    }

    /**
     * 新增换算
     * 
     * @param wmsMeasuringUnitConversion 换算
     * @return 结果
     */
    @Override
    public int insertWmsMeasuringUnitConversion(WmsMeasuringUnitConversion wmsMeasuringUnitConversion)
    {
        wmsMeasuringUnitConversion.setCreateTime(DateUtils.getNowDate());
        return wmsMeasuringUnitConversionMapper.insertWmsMeasuringUnitConversion(wmsMeasuringUnitConversion);
    }

    /**
     * 修改换算
     * 
     * @param wmsMeasuringUnitConversion 换算
     * @return 结果
     */
    @Override
    public int updateWmsMeasuringUnitConversion(WmsMeasuringUnitConversion wmsMeasuringUnitConversion)
    {
        wmsMeasuringUnitConversion.setUpdateTime(DateUtils.getNowDate());
        return wmsMeasuringUnitConversionMapper.updateWmsMeasuringUnitConversion(wmsMeasuringUnitConversion);
    }

    /**
     * 批量删除换算
     * 
     * @param mucUuids 需要删除的换算主键
     * @return 结果
     */
    @Override
    public int deleteWmsMeasuringUnitConversionByMucUuids(String[] mucUuids)
    {
        return wmsMeasuringUnitConversionMapper.deleteWmsMeasuringUnitConversionByMucUuids(mucUuids);
    }

    /**
     * 删除换算信息
     * 
     * @param mucUuid 换算主键
     * @return 结果
     */
    @Override
    public int deleteWmsMeasuringUnitConversionByMucUuid(String mucUuid)
    {
        return wmsMeasuringUnitConversionMapper.deleteWmsMeasuringUnitConversionByMucUuid(mucUuid);
    }
}
